package com.dippy.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@ToString
public class Book implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)//mybaitsPlus主键自增
    private Integer id;

    @NotNull(message="姓名不能为空")
    private String name;

    @NotNull(message="作者不能为空")
    private String author;
}
